Near field communication (NFC, Near Field Communication) is a short-range wireless connection technology, in which based on a radio frequency identification (RFID, Radio Frequency Identification) technology, electromagnetic induction is used to implement communication between electronic devices at a short distance. A user only needs a tap (Tap) or devices in close proximity to implement intuitive, secure, and noncontact information exchange, payment transactions, and the like.
A point-to-point (P2P) working mode is a major bidirectional interaction protocol defined in NFC standards. A major protocol used to establish a link at a data link layer between two NFC terminals in an interaction process in the working mode is the Logical Link Control Protocol (Logical Link Control Protocol, LLCP). With the development of the NFC standards, at present, a division manner is proposed, in which an NFC controller (NFC controller, NFCC) is fully responsible for work of the LLCP protocol, whereas a device host (Device Host, DH) is responsible for interaction of application layer data on the LLCP. A method in which a DH configures an NFCC is also specifically defined in NCI specifications.
For two NFC terminals, if the two NFC terminals have a matching carrier (that is, the two NFC terminals support at least one same type of carriers, for example, Bluetooth or Wi-Fi at the same time), by means of a simple tap, the two NFC terminals may exchange Bluetooth and/or Wi-Fi connection configuration information by means of NFC communication in a P2P working mode, so as to rapidly establish a Bluetooth or Wi-Fi connection between the terminals. Such a technology of exchanging connection configuration information by means of NFC communication and rapidly establishing a second type of connection (for example, a Bluetooth connection or Wi-Fi connection) is an NFC connection handover technology. In addition, In a case in which it is inconvenient for two NFC terminals to directly tap each other or get into proximity to each other to implement a connection handover, the NFC Forum proposes, in Connection Handover 1.3 Draft, a method in which a mobile NFC terminal (for example, a mobile phone, or a tablet computer) serves as a handover medium to assist the two terminals in implementing a connection handover to establish a Bluetooth or Wi-Fi connection.
In the prior art, according to Connection Handover 1.3 Draft, for two NFC terminals, when one terminal (serving as a connection handover requester or a handover medium) initiates NFC communication to the other terminal to request a connection handover, unless the other terminal does not have a carrier matching that of the terminal or does not support any carrier, the other terminal feeds back connection configuration information of a corresponding (that is: a matching or supportable) carrier to the terminal, so as to trigger a processing process in which a Bluetooth and/or Wi-Fi module establishes a connection.
The prior art has the following problems: When the other terminal no longer has a connection resource that can be used for establishing a connection, the other terminal still feeds back connection configuration information of the other terminal to the terminal, and triggers the Bluetooth and/or Wi-Fi module to attempt to establish a wireless connection (in this case, even if the Bluetooth and/or Wi-Fi module is triggered, the two terminals still cannot successfully establish a connection), resulting in low communication efficiency; it cannot be ensured that a connection resource that can be used for establishing a connection exists when a connection handover selector feeds back connection configuration information of the connection handover selector; and user experience is poor.